import { createRouter, createWebHistory } from 'vue-router'
import PublicView from '../views/PublicView.vue'

const routes = [
  {
    path: '/',
    name: 'public',
    component: PublicView,
    redirect:'/home',
    children:[
        {path: '/home', component: () => import('../views/home/HomeView.vue')},
      {path: '/home1', component: () => import('../views/home/HomeView1.vue')},
        {path: '/comment', component: () => import('../views/comment/CommentView.vue')},
      {path: '/userinfo', component: () => import('../views/UserInfoView.vue')},
      {path: '/tourlist', component: () => import('../views/tourlist/Tourlist.vue')},
      {path: '/hotel', component: () => import('../views/hotel/HoteiList.vue')}
      ]}
  ,{
    path: '/login', component: () => import('../views/LoginView.vue')
  }

]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router